home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / misc / robodoc.lha / ROBODoc.doc < prev    next >
Encoding:
Text File  |  1992-09-02  |  13.0 KB  |  417 lines

  1. ===============================================================================
  2.  
  3.                 ROBODoc v1.0a
  4.  
  5. -------------------------------------------------------------------------------
  6.  
  7.     (c) 1995, by Jacco van Weert, Maverick Software Development
  8.     email: weertj@euronet.nl
  9.  
  10.     ROBODoc documentation for the;
  11.       Amiga computers.
  12.       DEC Alpha systems.
  13.       DEC VAX systems.
  14.  
  15.     New versions of ROBODoc are made available on AmiNet.
  16.  
  17.     or
  18.  
  19.     On the Amigoline BBS;
  20.         Tel:    +31-8347-84968    (International)
  21.         Tel:    08347-84968    (From the Netherlands)
  22.  
  23. ===============================================================================
  24.  
  25.  
  26.  
  27.                 Preface
  28.                 -------
  29.  
  30. The complete ROBODoc archive is copyrighted by Jacco van Weert,
  31. Maverick Software Development.
  32.  
  33. ROBODoc can be freely distributed on FREEWARE base as long as all files remains
  34. in there original state, no files may be added to the archive, and also no files
  35. may be excluded.
  36.  
  37. This software is provided on an "AS IS" basis without warranty of any kind. The
  38. author is not responsible for any damage caused by using this software.
  39.  
  40.  
  41.                 Hardware requirements
  42.                 ---------------------
  43.  
  44. Amiga version:
  45.     ROBODoc runs well on every Amiga, no special requirements are necessary.
  46.  
  47. DEC Alpha/VAX:
  48.     ROBODoc v1.0a has been tested on a DEC Alpha system using OpenVMS-AXP 
  49.     v1.5, but in general terms there should be no problem to run this
  50.     program on other systems. It is a general C program.
  51.  
  52.  
  53.                 Introduction
  54.                 ------------
  55.  
  56. ROBODoc is based on the AutoDocs program written some time ago by Commodore.
  57. The idea is to include for every procedure/function a standard header
  58. containing all sorts of information about that procedure/function.
  59. ROBODoc will extract those headers from the source file and put them in a
  60. autodocs-file. This autodocs-file can be written in three different formats;
  61.  
  62. - Normal format;
  63.     The autodocs-file is just a plain ASCII text-file, this file is very
  64.     closely related to the one that the original AutoDocs program would
  65.     generated.
  66.  
  67. - HTML format;
  68.     The autodocs-file will be written as a HTML-file (HyperText Markup
  69.     Language), this format is used on the WWW-Internet. By using a
  70.     Mosiac/Netscape program you view the documentation.
  71.  
  72. - AmigaGuide format;
  73.     This is a format used on the Amiga computers to view in a HyperText
  74.     way a text-file. The AmigaGuide (OS3.0 tags are supported) program
  75.     is necessary to view the resulting autodocs-file.
  76.  
  77.  
  78.                 This Version
  79.                 ------------
  80.  
  81. This is the first 'real' version of ROBODoc, the previous 0.x versions where
  82. test versions. In version 1.0a all the options are included which I had
  83. in mind.
  84.  
  85.                 Procedure/Function Header
  86.                 -------------------------
  87.  
  88. We shall now discuss the general format of a procedure/function header.
  89. Full discussion of the header can be found in AutoDocs-documentation, this
  90. is a brief explanation of the header and the ROBODoc special items.
  91.  
  92. ROBODoc handles three different type of headers;
  93.  
  94. - MainProgram header (optional);
  95.     These headers are placed at the start of a program and containing
  96.     some general information about the program. These where not
  97.     available in the original AutoDocs program.
  98.  
  99. - Normal header;
  100.     The normal header, available to the general public.
  101.  
  102. - Internal header;
  103.     The internal header not available to the general public, mainly
  104.     used by the programmer him/herself.
  105.  
  106.  
  107.  
  108.                 MainProgram header
  109.                 ------------------
  110.  
  111. We now discuss an example of a MainProgram header. The following header was
  112. taken from the original ROBODoc program.
  113.  
  114. /****h* AUTODOC/ROBODoc ***************************************************
  115. *
  116. *    NAME
  117. *      ROBODoc -- AutoDoc formatter
  118. *
  119. *    COPYRIGHT
  120. *      Maverick Software Development
  121. *      This software is public domain and can be freely redistributed as
  122. *      long as it is in it's original state.
  123. *
  124. *    FUNCTION
  125. *      ROBODoc is indented as a replacement for the original AutoDocs program
  126. *      ROBODoc will extract from a source file the procedure comment headers
  127. *      and put them in a seperate documentation file. There are basically
  128. *      three different file outputs, Basic (Normal text based)/ HTML
  129. *      Markup langauge mainly used on the Internet thus the files can be viewed
  130. *      with a normal Mosaic viewer/ and finally AmigaGuide format, this format
  131. *      can be viewed by an AmigaGuide program (AMIGA ONLY).
  132. *
  133. *    AUTHOR
  134. *      Jacco van Weert
  135. *
  136. *    CREATION DATE
  137. *      20-Dec-94
  138. *
  139. *    MODIFICATION HISTORY
  140. *      25-Jan-94    -    v0.92: First version
  141. *         10-Mar-95     -       v1.0 : Complete version
  142. *
  143. *    NOTES
  144. *      None  
  145. *
  146. ****************************************************************************
  147. */
  148.  
  149. Because the program was written in C the header is in this form, in assembler
  150. or other langauges it would look a little bit different.
  151. MOST IMPORTANT is that the first line of the header must be reconized by the
  152. ROBODoc program. Therefore is the following rule;
  153.  
  154. The first character is not important.
  155. The next 4 characters must be asterics '*'.
  156. The next character defines the header type;
  157.     'h' = MainProgram
  158.     '*' = Normal header
  159.     'i' = Internal header
  160. Then follows 1 asteric '*' and 1 space.
  161. After this follows the [module name]/[procedure name]
  162.  
  163. Example:
  164.  
  165. In C    ->    /****h* programs/greatprogram.library *********
  166.     or    /****** greatprogram.library/program_init ******
  167.     or    /****i* greatprogram.library/very_secret *******
  168. In Assembler
  169.     ->    ;****h* programs/greatprogram.library ********
  170.     ->    ******* greatprogram.library/program_init ******
  171.     ->    *****i* greatprogram.library/internal_affairs *****
  172.  
  173. The header ends with a following line;
  174.  
  175. *********..etc
  176. or
  177. ;********..etc
  178. or
  179. %********..etc
  180.  
  181. In general the first character of the line is not important.
  182.  
  183.  
  184. But now back to the MainProgram header, it has the following items;
  185.  
  186. NAME            - The name of the program.
  187. COPYRIGHT        - The copyright note.
  188. FUNCTION        - The general function of the program.
  189. AUTHOR            - The author of the program (very important :)
  190. CREATION DATE        - When did you started?
  191. MODIFICATION HISTORY    - All the changed made to the program.
  192. NOTES            - General notes.
  193.  
  194. Important is that all items have the same indent.
  195.  
  196.  
  197.                 Normal header
  198.                 -------------
  199.  
  200. The normal header differs not from the original AutoDoc header which we
  201. will give here;
  202.  
  203. /****** financial.library/StealMoney ******************************************
  204. *   NAME    
  205. *     StealMoney -- Steal money from the Federal Reserve Bank. (V77)
  206. *   SYNOPSIS
  207. *    error = StealMoney( userName,amount,destAccount,falseTrail )
  208. *    D0,Z                D0       D1.W    A0         [A1]
  209. *
  210. *    BYTE StealMoney
  211. *         ( STRPTR,UWORD,struct AccountSpec *,struct falseTrail *);
  212. *
  213. *   FUNCTION
  214. *    Transfer money from the Federal Reserve Bank into the specified
  215. *    interest-earning checking account.  No records of the transaction
  216. *    will be retained.
  217. *   INPUTS
  218. *     userName      - name to make the transaction under.  Popular favorites
  219. *                    include "Ronald Reagan" and "Mohamar Quadaffi".
  220. *    amount        - Number of dollars to transfer (in thousands).
  221. *    destAccount   - A filled-in AccountSpec structure detailing the
  222. *                    destination account (see financial/accounts.h).
  223. *            If NULL, a second Great Depression will be triggered.
  224. *    falseTrail    - If the DA_FALSETRAIL bit is set in the destAccount,
  225. *            a falseTrail structure must be provided.
  226. *    
  227. *   RESULT
  228. *     error - zero for success, else an error code is returned (see
  229. *            financial/errors.h).  The Z condition code is guaranteed.
  230. *   EXAMPLE
  231. *    Federal regulations prohibit a demonstration of this function. 
  232. *
  233. *   NOTES
  234. *    Do not run on Tuesdays!
  235. *
  236. *   BUGS
  237. *     Before V88, this function would occasionally print the address and
  238. *    home phone number of the caller on local police 976 terminals.
  239. *    We are confident that this problem has been resolved.
  240. *   SEE ALSO
  241. *     CreateAccountSpec(),security.device/SCMD_DESTROY_EVIDENCE,
  242. *    financial/misc.h
  243. *****************************************************************************/
  244.  
  245.  
  246.                 Internal header
  247.                 ---------------
  248.  
  249. The same as the Normal header, except the internal header starts with the line
  250. /****i* or ;****i* or *****i* or......
  251.  
  252.  
  253.                 Items file
  254.                 ----------
  255.  
  256. ROBODoc uses a items-file (ROBODoc.ITM) for the definition of the items.
  257. In this file all the possible item headers are stored. By default,
  258. only the discussed item header are placed but the user can add up to
  259. 50 items. The items-file must be in the directory from where ROBODoc is
  260. started.
  261.  
  262. The default items-file has the following layout;
  263.  
  264.     NAME            3
  265.     COPYRIGHT        20
  266.     SYNOPSIS        5
  267.     FUNCTION        40
  268.     AUTHOR            0
  269.     CREATION_DATE        0
  270.     MODIFICATION_HISTORY    8
  271.     INPUTS               8
  272.     RESULT               8
  273.     EXAMPLE              4
  274.     NOTES                0
  275.     BUGS                 10
  276.     SEE_ALSO             2
  277.  
  278. Every line holds first the item header name and then a item type number.
  279. The items must appear in order as they appear in a procedure header.
  280. Please note that a '_' in an item name is replaced by a space.
  281.  
  282. Item Type Number - This number is used when a HTML or AmigaGuide output
  283. is generated, it defined the layout of the text body in the resulting file.
  284.  
  285. In this Item Type Number flags are stored, current definitions;
  286.  
  287.     1    =    Item Header in Large Font.        (HTML)
  288.     2    =    Text body in Large Font.        (HTML)
  289.     4    =    Text body in Italics.            (HTML/AMIGAGUIDE)
  290.     8    =    Text body in NON-Proportional font. (HTML)
  291.     16    =    Text body in Small Font.        (HTML)
  292.     32    =    Text body in Bold.            (HTML/AMIGAGUIDE)
  293.  
  294. Add the numbers together of the options you want to have.
  295.  
  296.  
  297.                 XREF files
  298.                 ----------
  299.  
  300. The 0.x versions of ROBODoc had a simple XREF mechanism. But starting from
  301. version 1.0 ROBODoc can make references to other files.
  302. Please note that references can only be used when creating HTML or AmigaGuide
  303. files.
  304.  
  305. The [GENXREF] parameter ROBODoc will generate a standard XREF-File of the
  306. source-file. In this way XREF-files of the different source-files can be
  307. generated. When this parameter is used, ONLY the XREF-File is created NOT
  308. the autodocs-file.
  309.  
  310. As soon as all the XREF-files are created the documentation can be created.
  311. The [XREF] parameter contains the name of the file IN which the names
  312. all XREF-files are defined (xreflist_filename). This file must be created
  313. by the user.
  314. XREF-Files can also be created by the user or taken by other means, e.g.
  315. the Autodoc.xref. ROBODoc uses the same format as these standard XREF
  316. files, in v1.0a the exceptions are not yet supported.
  317.  
  318. Example:
  319.  
  320. In the ROBODoc.lha archive there are two example programs PROG1.C and PROG2.C.
  321.  
  322. First create the XREF-Files when want to create HTML autodocs-files:
  323.  
  324. >ROBODoc PROG1.C PROG1.HTML GENXREF PROG1.XREF HTML TOC SORT INTERNAL
  325. >ROBODoc PROG2.C PROG2.HTML GENXREF PROG2.XREF HTML TOC SORT INTERNAL
  326.  
  327. At this moment the XREF-Files PROG1.XREF and PROG2.XREF are created.
  328.  
  329. Now create a <xreflist_filename> file.
  330. This file will hold only two lines;
  331.  
  332. >PROG1.XREF
  333. >PROG2.XREF
  334.  
  335. More XREF-Files can being added. The name of this file can be anything,
  336. e.g. 'XREF_Files'.
  337.  
  338. Now generate the final documentation;
  339.  
  340. >ROBODoc PROG1.C PROG1.HTML XREF XREF_Files HTML TOC SORT INTERNAL
  341. >ROBODoc PROG2.C PROG2.HTML XREF XREF_Files HTML TOC SORT INTERNAL
  342.  
  343. When the source-code is not changed it not neccesary to create
  344. everytime a new XREF-File.
  345.  
  346.  
  347.                 Usage of ROBODoc
  348.                 ----------------
  349.  
  350. To list the arguments needed by ROBODoc just enter ROBODoc or ROBODoc ?
  351. To following message will be printed;
  352.  
  353. ROBODoc v1.0a, autodocs formatter
  354. ==============================================
  355. (c) 10-3-95, Maverick Software Development
  356. Written by J.v.Weert, email: weertj@euronet.nl
  357. FORMAT
  358.   ROBODoc filename docfilename [GENXREF xref_filename] [HTML] [GUIDE] [INTERNAL]
  359.  [SORT] [TOC] [XREF xreflist_filename]
  360.  
  361. The parameters;
  362.  
  363.     filename    = The source code filename.
  364.     docfilename    = The name of the documentation file,
  365.               which will be created.
  366.     GENXREF xref_filename
  367.             = Generate a XREF-file of the source code.
  368.               The <xref_filename> file is created as XREF-file.
  369.     HTML        = The documentation will be in HTML format.
  370.     GUIDE        = The documentation will be in AmigaGuide format.
  371.     INTERNAL    = The internal headers are also included.
  372.     SORT        = The procedures will be sorted.
  373.     TOC        = A table of contents will be added. TOC will be
  374.               automatically set when HTML or GUIDE is set.
  375.     XREF xreflist_filename
  376.             = Cross-references will be generated, the XREF-Files
  377.               names are stored in the <xreflist_filename> file.
  378.               
  379.  
  380.                 CONCLUSION
  381.                 ----------
  382.  
  383. This is the first complete version of ROBODoc. In the future probably more
  384. features will be added.
  385.  
  386.  
  387.                 SUGGESTIONS EN BUGS
  388.                 -------------------
  389.  
  390. Suggestions and bug reports (please use the included Bug-report form) can
  391. be send to;
  392.  
  393.     Email:    weertj@euronet.nl
  394.  
  395.     or
  396.  
  397.     Maverick Software Development, T.a.v. J.v.Weert
  398.     Haverdreef 131,
  399.     7006 LH, Doetinchem.
  400.     The Netherlands.
  401.  
  402.  
  403.                 __  __________
  404.              __/  \/         /   weertj@euronet.nl
  405.           __/  \__/ Maverick
  406.          /  \__/  \ Software
  407.          \__/  \__/ Development
  408.          _______________/        slothoub@xs4all.nl
  409.  
  410.  
  411.